package excp;

class ExTest4{
public static void main(String st[]){
try{
String first=st[0];
String second=st[1];
System.out.println(first+"\t"+second);
System.out.println(first+second);
int ab=Integer.parseInt(first);
int bc=Integer.parseInt(second);
System.out.println("sum is\t:"+(ab+bc));
int r=ab%bc;
System.out.println("Remainder is\t:"+r);
}
catch(Exception e){
System.out.println("---"+e+"---\n");
if(e instanceof ArithmeticException){
System.out.println("dividing with zero");
}else if(e instanceof NumberFormatException){
System.out.println("Required value is int Type");
}
if(e instanceof ArrayIndexOutOfBoundsException){
System.out.println("provide two values as CLA");
}
}
System.out.println("== main End ==");
}
}